import pytest

from day05.duBiaoGe import DoBiaoGe
from day05.mojisuanji import JiSuanQi

# l=[(5,2,3),(-3,5,-8),(2,'m','非法输入')]
f=r'D:\软测\新建文件夹\3-18 python\day05\data\yunSuanData.xlsx'
l=DoBiaoGe().doExeRead(f,'jian',2,11,2,5)
class TestJian():


    # @pytest.mark.parametrize('a,b,yq',
    #                          l,
    #                          ids=['ok','ok','noF']
    #                          )
    @pytest.mark.parametrize('title,a,b,yq',
                             l
                             )


    def testjian(self,title,a,b,yq):
        ji = JiSuanQi()
        jian=ji.jian(a,b)

        if isinstance(jian,(int,float)):
            assert yq==jian
        else:
            assert yq in jian














